<?php
namespace Modules\Order\Entities;

use Modules\Order\Traits\Skuable;
use ThrowException;

class Sku 
{
    use Skuable;

    public $id;
    public $uuid;
    public $number;
    public $title;
    public $money_price;
    public $score_price;
    public $stock;
    public $thumb;
    public $attrs;
    public $discount_money_price;
    public $discount_score_price;
    public $brokerage_money;
    public $brokerage_score;
    public $reward_score;
    public $reward_money;
    public $parent_product;

    public function getProductType()
    {
        return 'custom';
    }

    public function __construct($options = [])
    {
        $this->money_price = @$options['money_price'];
        $this->score_price = @$options['score_price'];
        $this->title = @$options['title'];
        $this->stock = @$options['stock'];
        $this->thumb = @$options['thumb'];
        $this->id = 1;
        $this->uuid = uniqid();
        $this->number = 'default_sku_number';
    }
}
